using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace WFTest.Entity
{
    public partial class Model10 : DbContext
    {
        public Model10()
            : base("name=Model10")
        {
        }

        public virtual DbSet<V_PRD_MOSTATUS> V_PRD_MOSTATUS { get; set; }
        public virtual DbSet<V_PUR_POORDER> V_PUR_POORDER { get; set; }
        public virtual DbSet<V_STK_INSTOCK_A> V_STK_INSTOCK_A { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<V_PRD_MOSTATUS>()
                .Property(e => e.FDocumentStatus)
                .IsUnicode(false);

            modelBuilder.Entity<V_PRD_MOSTATUS>()
                .Property(e => e.FSTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_PRD_MOSTATUS>()
                .Property(e => e.FPickMtrlStatus)
                .IsUnicode(false);

            modelBuilder.Entity<V_PRD_MOSTATUS>()
                .Property(e => e.FQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PRD_MOSTATUS>()
                .Property(e => e.FREALQTY)
                .HasPrecision(38, 10);

            modelBuilder.Entity<V_PRD_MOSTATUS>()
                .Property(e => e.FIncompleteQTY)
                .HasPrecision(38, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FDOCUMENTSTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FCLOSESTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FMRPCLOSESTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FRECEIVEQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FSTOCKINQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FMRBQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FREMAINRECEIVEQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FREMAINSTOCKINQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FPRICE)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_PUR_POORDER>()
                .Property(e => e.FTAXPRICE)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_STK_INSTOCK_A>()
                .Property(e => e.FDOCUMENTSTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_STK_INSTOCK_A>()
                .Property(e => e.FREALQTY)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_STK_INSTOCK_A>()
                .Property(e => e.FPRICE)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_STK_INSTOCK_A>()
                .Property(e => e.FTAXPRICE)
                .HasPrecision(23, 10);
        }
    }
}
